package com.chesnutconsulting.reports;


public class UserInterfaceElement {
	
	String cssClass = null;
	int htmlElementSequence = 0;
	String htmlElementType = null;
	String htmlElementLabel = null;
	String htmlElementName = null;
	
	public UserInterfaceElement ( String cssClass, String htmlElementType, String htmlElementLabel, String htmlElementName, int htmlElementSequence ) throws Exception
	{
		if ( cssClass == null || htmlElementType == null )
		{
			throw new Exception ( "Invalid user interface element. Missing cssClass or htmlElementType." );
		}
		
		this.cssClass = cssClass;
		this.htmlElementType = htmlElementType;
		this.htmlElementSequence = htmlElementSequence;
		this.htmlElementLabel = htmlElementLabel;
		this.htmlElementName = htmlElementName;

	}
	
	public String getCssClass() {
		return cssClass;
	}
	public void setCssClass(String cssClass) {
		this.cssClass = cssClass;
	}

	public String getHtmlElementType() {
		return htmlElementType;
	}

	public int getHtmlElementSequence() {
		return htmlElementSequence;
	}

	public String getHtmlElementLabel() {
		return htmlElementLabel;
	}

	public String getHtmlElementName() {
		return htmlElementName;
	}
	
	@Override
	public String toString()
	{
		return this.htmlElementName;
	}
	
}
